<template>
	<view>
		<!-- 头部 -->
		<hx-navbar ref="hxnb" :config="config">
			<block slot="right">
				<view style="margin-right: 20rpx;" @click="feedback">
					去反馈
				</view>
			</block>
		</hx-navbar>
		<view class="feedback" v-for="(item,index) in feedbackData" :key="index">
			<view class="time" style="color: rgba(30,30,30,0.3);font-size: 28rpx;">
				反馈时间：{{item.createTime}}
			</view>
			<u-album :urls="[item.image]" keyName="src2" space="5" style="margin: 30rpx 0;"></u-album>
			<view class="flex" style="justify-content: space-between;">
				<text>
					{{item.content}}
				</text>
				<text style="color:#F84949" v-if="item.status == 0">
					未处理
				</text>
				<text style="color: rgba(30,30,30,0.3);font-size: 28rpx;" v-if="item.status == 1">
					已处理
				</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				config: {
					title: '我的反馈',
					color: '#111111',
					backgroundColor: [1, '#FFFFFF'],
					border: true,
					rightSlot: true,
					// #ifdef H5
					backPage: '',
					// #endif
				},
				feedbackData: []
			}
		},
		onLoad() {
			this.getFeedbackList(1, 10)
		},
		methods: {
			//帮助列表
			getFeedbackList(num, size) {
				let data = {
					pageNo: num,
					pageSize: size,
				}
				this.$api.feedbackList(data).then((res) => {
					// this.feedbackData = res.data.result.list
					console.log('宋人头的亚轩', res)
					res.data.result.list.forEach((item) => {
						item.createTime = this.$tools.fileTime(item.createTime)
					})
					if (num == 1) {
						this.feedbackData = res.data.result.list
					} else {
						this.feedbackData = this.projectList.concat(res.data.result.list)
					}
					this.mescroll.endBySize(res.data.result.list.length, res.data.result
						.total);
				})
			},
			// 反馈
			feedback() {
				this.$tools.goPageNoAuth('/clientEnd/page/decoration/addFeedback')
			},
		}
	}
</script>

<style scoped>
	page {
		background-color: #F0F3FA ;
	}

	.feedback {
		background-color: #fff;
		padding: 30rpx;
		margin: 30rpx;
		border-radius: 20rpx;
	}
</style>
